using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.BaseConfigs
{
    public class BaseConfigConfig : IEntityTypeConfiguration<BaseConfig>
    {
        public void Configure(EntityTypeBuilder<BaseConfig> builder)
        {
            builder.HasComment("基础配置表");
            builder.Property(x => x.ConfigKey).IsRequired().HasMaxLength(100).HasComment("配置名");
            builder.Property(x => x.ConfigValue).IsRequired().HasMaxLength(100).HasComment("配置值");
            builder.Property(x => x.Desc).HasMaxLength(255).HasComment("配置说明");
            builder.Property(x => x.IsBackground).HasDefaultValue(false).HasComment("后台配置");
        }
    }
}